<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018/7/24
 * Time: 14:52
 */
namespace app\portal\controller;

use app\admin\model\RouteModel;
use cmf\controller\AdminBaseController;
use app\portal\model\PortalPostModel;
use app\portal\service\PostService;
use app\admin\model\ThemeModel;
use think\Db;

class BranchesController extends AdminBaseController
{

    public static $lang_arr=array();
    public function _initialize()
    {
        if(empty(self::$lang_arr)){
            //self::$lang_arr=$this->read('zh-us');
        }
    }
    public function index(){
        $order = array('id' => 'desc');
        if($param = $this->request->param('keyword')){
            $where['join_branches'] = $param;
        }else{
            $where = '';
        }
        $data=Db::name('branches')->where($where)->order($order)->paginate(15);
        $this->assign('data',$data);
        $this->assign('page', $data->render());
        return $this->fetch();

    }

}